﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using TjZheng.Framework;

namespace TjZheng.SSO.Web.Controllers
{
    public class ValuesController : ApiController
    {
        // GET api/values
        public InvokeResult Get()
        {
            return new InvokeResult
            {
                ResultCode = "Get",
                ResultMessage = "Get请求"
            };
        }

        // GET api/values/5
        public InvokeResult Get(int id)
        {
            return new InvokeResult
            {
                ResultCode = "Get",
                ResultMessage = "Get请求",
                Data = "value"
            };
        }

        // POST api/values
        public InvokeResult Post([FromBody]string value)
        {
            return new InvokeResult
            {
                ResultCode = "Post",
                ResultMessage = "Post请求",
                Data = value
            };
        }

        // PUT api/values/5
        public InvokeResult Put(int id, [FromBody]string value)
        {
            return new InvokeResult
            {
                ResultCode = "Put",
                ResultMessage = "Put请求",
                Data = value
            };
        }

        // DELETE api/values/5
        public InvokeResult Delete(int id)
        {
            return new InvokeResult
            {
                ResultCode = "Delete",
                ResultMessage = "Delete请求"
            };
        }
    }
}
